import { http } from '../http';
import {
	GetEditConfigParamsType,
	GetEditConfigResponseType,
	GetAICEConfigResponseType,
	GetVoicePlayConfigResponseType
} from './system.type';

const aiceUrl = '/api/aice';
const aiasUrl = '/api/aias';
const rmsUrl = '/api/rms';
const tsmsUrl = '/api/tsms';

/**
 * @name: 获取AICE配置
 * @param {number} params.isFront  传1代表页面获取业务配置，不传或传其他代表后台配置页面获取全部配置
 * @return {*}
 */
export const getEditConfigAPI = (
	params: GetEditConfigParamsType
): Promise<GetEditConfigResponseType> => {
	return http.get(`${aiceUrl}/editConfig/getEditConfig`, { params });
};

/**
 * @description 查询AI分析模式
 */
export const getAIASConfigAPI = (): Promise<GetAICEConfigResponseType> => {
	return http.get(`${aiasUrl}/config/getAIASConfig`);
};

/**
 * @description 获取视角顺序
 */
export const getAudioRecOrderAPI = (): Promise<string> => {
	return http.post(`${rmsUrl}/system/getAudioRecOrder`);
};

/**
 * @description 获取系统多画面播放时的音频配置
 */
export const getVoicePlayConfigAPI = (): Promise<GetVoicePlayConfigResponseType> => {
	return http.get(`${tsmsUrl}/tsms/getVoicePlayConfig`);
};
